
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<div class="bjui-pageContent">
    <form action="${ctx}/sys/sysAdvertisementAction/doSave" class="ajaxForm" data-toggle="validate" enctype="multipart/form-data">
        <input type="hidden" name="op" id="j_dialog_op" value="${param.op}${op}">
        <input type="hidden" name="id" id="j_dialog_id" value="${advertisement.id}">
        <c:if test="${!empty role}">
	        <input type="hidden" name="status" id="j_dialog_op" value="${advertisement.status}">
        </c:if>

        <table class="table table-condensed table-hover">
            <tbody>
                <tr>
                    <td colspan="2" align="center" valign="middle"><h4>${title}</h4></td>
                </tr>
                <tr>
              
               
                    <td>
                        <label for="name" class="control-label x90">广告位置：</label>
              
                   	 <select id="j_dialog_type_id" name="adLocation" data-toggle="selectpicker">
                        	<c:forEach items="${code}"  var="c">
                        		<c:choose>
                        			<c:when test="${advertisement.adLocation==c.codeName&&c.codeType=='advertisementType'}">
                        				<option value="${c.codeValue}_${c.codeName}" selected="selected">${c.codeName}</option>
                        			</c:when>
                        			<c:when test="${c.codeType=='advertisementType'}">
                        				<option value="${c.codeValue}_${c.codeName}" >${c.codeName}</option>
                        			</c:when>
                        		</c:choose>
                        	</c:forEach>
                        </select>
                    </td>
                     <td >
                        <label for="name" class="control-label x90">广告名称：</label>
                        <input class="" id="adName" type="text" name="adName"  value="${advertisement.adName}"/>
                    </td>
                </tr>
                 
                    <tr>
                   
                
                    <td style="width: 400px;">
                        <label for="name" class="control-label x90">广告排序：</label>
                        <input class="" id="seqIdx" type="text" name="seqIdx"  value="${advertisement.seqIdx}"/>
                    </td>
                
                </tr>
            
                <tr>
                  
                     <td colspan="2" >
                        <label for="name" class="control-label x90">广告图片：</label>
                        <input class="" id="adPicture" type="text" name="adPicture" readonly="readonly"
						value="${advertisement.adPicture}" />
                        <input type="file" name="file" 
				 accept="image/*"
					 ></td>
                  </tr>
                    <tr>
                	<td colspan="2">
                        <label for="description" class="control-label x90">广告内容：</label>
                        <textarea name="adContent" id="adContent" rows="5" cols="58">${advertisement.adContent}</textarea>
                    </td>
                </tr>
                  
                  <tr>
                	<td colspan="2">
                        <label for="description" class="control-label x90">备注：</label>
                        <textarea name="remark" id="remark" rows="5" cols="58">${advertisement.remark}</textarea>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
        <li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
    </ul>
</div>